import React from 'react'
import ReactDOM from 'react-dom'
import './css/index.css'
import App from './js/app';

React.Component.prototype.expr_class = function (...arg) {
	return arg.reduce((classList, argClass) => {
		if(Object.prototype.toString.apply(argClass) === '[object Object]') {
			Object.keys(argClass).forEach(item => {
				argClass[item] && classList.push(item);
			})
			return classList;
		}

		if(Object.prototype.toString.apply(argClass) === '[object Array]') {
			classList.concat(...argClass);
			return classList;
		}

		classList.push(argClass);
		return classList;
	}, []).join(' ');
}

ReactDOM.render(
  <App />,
  document.getElementById('app')
);
